package nccu.dao.hibernate;

import nccu.dao.ExamReportDao;
import nccu.model.ExamReport;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * This class interacts with Spring's HibernateTemplate to save/delete and
 * retrieve ExamReport objects.
 *
 * @author <a href="mailto:chris.oberle@gmail.com">Chris Oberle</a>
*/
@Repository("examReportDao")
public class ExamReportDaoHibernate extends GenericDaoHibernate<ExamReport, Long> implements ExamReportDao {

    public ExamReportDaoHibernate() {
        super(ExamReport.class);
    }

    public List<ExamReport> findById(Long id) {
        return getHibernateTemplate().find("from ExamReport where id=?", id);
    }
}
